package model;

import static org.junit.Assert.*;

import java.util.GregorianCalendar;

import org.junit.Before;
import org.junit.Test;

public class DailyRegularTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void testTotalDose() {
		DailyRegular dose;
		dose= new DailyRegular(new GregorianCalendar(2008,3,1), 
				new GregorianCalendar(2008,3,1),0,0, 0, 0);
				assertEquals(1, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,1),
				new GregorianCalendar(2008,3,2),0,0, 0, 0);
				assertEquals(2, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,1),
				new GregorianCalendar(2008,3,10),0,0, 0, 0); 
				assertEquals(10, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,2), 
				new GregorianCalendar(2008,5,1),0,0, 0, 0);
		assertEquals(61, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,1),
				new GregorianCalendar(2009,3,1),0,0, 0, 0);
				assertEquals(366, dose.dayCount());
				
		
		dose= new DailyRegular(new GregorianCalendar(2008,3,1), 
				new GregorianCalendar(2008,3,1),1,2, 4, 8);
		assertEquals(1, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,1), 
				new GregorianCalendar(2008,3,2),1,2, 4, 8);
		assertEquals(2, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,1),				
				new GregorianCalendar(2008,3,10),1,2, 4, 8);
		assertEquals(10, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,2), 
				new GregorianCalendar(2008,5,1),1,2, 4, 8);
		assertEquals(61, dose.dayCount());
		dose= new DailyRegular(new GregorianCalendar(2008,3,1), 
				new GregorianCalendar(2009,3,1),1,2, 4, 8);
		assertEquals(366, dose.dayCount());
		
	}

	@Test
	public void testDayDose() {
		DailyRegular dayDose;
		dayDose= new DailyRegular(new GregorianCalendar(2008,3,1), 
				new GregorianCalendar(2009,3,1),1,2, 4, 8);
		assertEquals(15, dayDose.dayDose());
		dayDose = new DailyRegular(new GregorianCalendar(2008,3,1), 
				new GregorianCalendar(2008,3,1),0,0, 0,0);
		assertEquals(0, dayDose.dayDose());
		
	}
	}

//	@Test
//	public void testDailyRegular() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testGetMorningUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testSetMorningUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testGetNoonUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testSetNoonUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testGetEveningUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testSetEveningUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testGetNightUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testSetNightUnit() {
//		fail("Not yet implemented");
//	}
//
//	@Test
//	public void testGetDoses() {
//		fail("Not yet implemented");
//	}
//
//}
